<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TScrollBar类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_t_scroll_bar-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TScrollBar类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<div class="dynheader">
类 TScrollBar 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_t_scroll_bar.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a4609e0f2e130dc58c7cdf5d2a63b52b9"><td class="memItemLeft" align="right" valign="top"><a id="a4609e0f2e130dc58c7cdf5d2a63b52b9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TScrollBar</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a4609e0f2e130dc58c7cdf5d2a63b52b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25a7d3c3bb32f0d295049a1edce065b1"><td class="memItemLeft" align="right" valign="top"><a id="a25a7d3c3bb32f0d295049a1edce065b1"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TScrollBar</b> (const scroll_bar_t *nativeObj)</td></tr>
<tr class="separator:a25a7d3c3bb32f0d295049a1edce065b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d540f6bacb6dcbda238c83300a31f7c"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a1d540f6bacb6dcbda238c83300a31f7c">SetParams</a> (int32_t virtual_size, int32_t row)</td></tr>
<tr class="separator:a1d540f6bacb6dcbda238c83300a31f7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ce9ee8f69d3016716d399beba03e7a2"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a0ce9ee8f69d3016716d399beba03e7a2">ScrollTo</a> (int32_t value, int32_t duration)</td></tr>
<tr class="separator:a0ce9ee8f69d3016716d399beba03e7a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0484f7222ff96b53a5c7ab6e3ea000f6"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a0484f7222ff96b53a5c7ab6e3ea000f6">SetValue</a> (int32_t value)</td></tr>
<tr class="separator:a0484f7222ff96b53a5c7ab6e3ea000f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60dda45a298cccadf145b648e5c01fb7"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a60dda45a298cccadf145b648e5c01fb7">AddDelta</a> (int32_t delta)</td></tr>
<tr class="separator:a60dda45a298cccadf145b648e5c01fb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a398d425978a1d7f7dc1a3ecda9fdbeda"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a398d425978a1d7f7dc1a3ecda9fdbeda">ScrollDelta</a> (int32_t delta)</td></tr>
<tr class="separator:a398d425978a1d7f7dc1a3ecda9fdbeda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a990dea3974c52a72398ed948b58599ef"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a990dea3974c52a72398ed948b58599ef">SetValueOnly</a> (int32_t value)</td></tr>
<tr class="separator:a990dea3974c52a72398ed948b58599ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad5cf13c0c9ed79caf58aa072daeeee2"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#aad5cf13c0c9ed79caf58aa072daeeee2">SetAutoHide</a> (bool auto_hide)</td></tr>
<tr class="separator:aad5cf13c0c9ed79caf58aa072daeeee2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a1653f58568b388494412bd11c6cfc3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a1a1653f58568b388494412bd11c6cfc3">IsMobile</a> ()</td></tr>
<tr class="separator:a1a1653f58568b388494412bd11c6cfc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41d82384d1fd184b9e4cf35b901c036b"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a41d82384d1fd184b9e4cf35b901c036b">SetAnimatorTime</a> (uint32_t animator_time)</td></tr>
<tr class="separator:a41d82384d1fd184b9e4cf35b901c036b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9099efab1a042abfc22fa4a3273013ee"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a9099efab1a042abfc22fa4a3273013ee">HideByOpacityAnimation</a> (int32_t duration, int32_t delay)</td></tr>
<tr class="separator:a9099efab1a042abfc22fa4a3273013ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44b577fb500ad29aee7c0daa3b15984e"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a44b577fb500ad29aee7c0daa3b15984e">ShowByOpacityAnimation</a> (int32_t duration, int32_t delay)</td></tr>
<tr class="separator:a44b577fb500ad29aee7c0daa3b15984e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab96947296739d842a372d8541c406132"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#ab96947296739d842a372d8541c406132">GetVirtualSize</a> () const</td></tr>
<tr class="separator:ab96947296739d842a372d8541c406132"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e42850d84226f4d5d29454d3d73b96c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a5e42850d84226f4d5d29454d3d73b96c">GetValue</a> () const</td></tr>
<tr class="separator:a5e42850d84226f4d5d29454d3d73b96c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab8cc5a1421cb1b6dcb80ce89bba2e2f"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#aab8cc5a1421cb1b6dcb80ce89bba2e2f">GetRow</a> () const</td></tr>
<tr class="separator:aab8cc5a1421cb1b6dcb80ce89bba2e2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba2ac8ed45af4af945c1e886fe1b09a8"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#aba2ac8ed45af4af945c1e886fe1b09a8">GetAnimatorTime</a> () const</td></tr>
<tr class="separator:aba2ac8ed45af4af945c1e886fe1b09a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae007a7f3334b813b2d0e7593e599ddec"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#ae007a7f3334b813b2d0e7593e599ddec">GetAnimatable</a> () const</td></tr>
<tr class="separator:ae007a7f3334b813b2d0e7593e599ddec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7064e59b4bf56c65e4368c95da89543a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a7064e59b4bf56c65e4368c95da89543a">GetAutoHide</a> () const</td></tr>
<tr class="separator:a7064e59b4bf56c65e4368c95da89543a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:ae0d8407fd513f306dd11624af61146a8"><td class="memItemLeft" align="right" valign="top"><a id="ae0d8407fd513f306dd11624af61146a8"></a>
static <a class="el" href="class_t_scroll_bar.html">TScrollBar</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:ae0d8407fd513f306dd11624af61146a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e55c8df0ee644feba15db2c8a3a1d39"><td class="memItemLeft" align="right" valign="top"><a id="a3e55c8df0ee644feba15db2c8a3a1d39"></a>
static <a class="el" href="class_t_scroll_bar.html">TScrollBar</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:a3e55c8df0ee644feba15db2c8a3a1d39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac87e52828309a9f11de7978d35a11e94"><td class="memItemLeft" align="right" valign="top"><a id="ac87e52828309a9f11de7978d35a11e94"></a>
static <a class="el" href="class_t_scroll_bar.html">TScrollBar</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:ac87e52828309a9f11de7978d35a11e94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b8ea2e060786cccf33c9f90fff6af33"><td class="memItemLeft" align="right" valign="top"><a id="a4b8ea2e060786cccf33c9f90fff6af33"></a>
static <a class="el" href="class_t_scroll_bar.html">TScrollBar</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:a4b8ea2e060786cccf33c9f90fff6af33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16fe7b63de8eff63980a1fa6f83ce6c8"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#a16fe7b63de8eff63980a1fa6f83ce6c8">Create</a> (TWidget &amp;parent, xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:a16fe7b63de8eff63980a1fa6f83ce6c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac22783ca211b9804ac220270c4215887"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#ac22783ca211b9804ac220270c4215887">CreateMobile</a> (TWidget &amp;parent, xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:ac22783ca211b9804ac220270c4215887"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab573a1d2052e6302f136c86f576ec3b3"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_scroll_bar.html#ab573a1d2052e6302f136c86f576ec3b3">CreateDesktop</a> (TWidget &amp;parent, xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:ab573a1d2052e6302f136c86f576ec3b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>滚动条控件。</p>
<blockquote class="doxtable">
<p>目前只支持垂直滚动。 </p>
</blockquote>
<p>scroll_bar_t是widget\_t的子类控件，widget_t的函数均适用于scroll_bar_t控件。</p>
<p>在xml中使用"scroll\_bar"或"scroll\_bar\_d"或"scroll\_bar\_m"标签创建滚动条控件。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">list_view</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span>  <span class="keyword">y</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;-80&quot;</span> <span class="keyword">item_height</span>=<span class="stringliteral">&quot;60&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">scroll_view</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;view&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span>  <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;100%&quot;</span>&gt;</div>
<div class="line">*...</div>
<div class="line">*&lt;/<span class="keywordtype">scroll_view</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">scroll_bar_m</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;bar&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;right&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;6&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">value</span>=<span class="stringliteral">&quot;0&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">list_view</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考：<a href="&lt;/blockquote&gt; https://github.com/zlgopen/awtk/blob/master/design/default/ui/list_view_m.xml">list_view_m.xml</a></p>
<p>在c代码中使用函数scroll_bar_create创建列表项控件。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;default&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">normal</span> <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#c0c0c0&quot;</span> <span class="keyword">fg_color</span>=<span class="stringliteral">&quot;#808080&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">over</span> <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#c0c0c0&quot;</span> <span class="keyword">fg_color</span>=<span class="stringliteral">&quot;#808080&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">pressed</span> <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#c0c0c0&quot;</span> <span class="keyword">fg_color</span>=<span class="stringliteral">&quot;#808080&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">style</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考：<a href="&lt;/blockquote&gt; https://github.com/zlgopen/awtk/blob/master/design/default/styles/default.xml#L350">theme default</a> </p>
</blockquote>
</blockquote>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a60dda45a298cccadf145b648e5c01fb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60dda45a298cccadf145b648e5c01fb7">&#9670;&nbsp;</a></span>AddDelta()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TScrollBar::AddDelta </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>delta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>在当前的值上增加一个值，并触发EVT_VALUE_CHANGED事件。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">delta</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a16fe7b63de8eff63980a1fa6f83ce6c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16fe7b63de8eff63980a1fa6f83ce6c8">&#9670;&nbsp;</a></span>Create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget TScrollBar::Create </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建scroll_bar对象</p>
<blockquote class="doxtable">
<p>根据宏WITH_DESKTOP_STYLE决定创建desktop风格还是mobile风格的滚动条 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="ab573a1d2052e6302f136c86f576ec3b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab573a1d2052e6302f136c86f576ec3b3">&#9670;&nbsp;</a></span>CreateDesktop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget TScrollBar::CreateDesktop </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建desktop风格的scroll_bar对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="ac22783ca211b9804ac220270c4215887"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac22783ca211b9804ac220270c4215887">&#9670;&nbsp;</a></span>CreateMobile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget TScrollBar::CreateMobile </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建mobile风格的scroll_bar对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="ae007a7f3334b813b2d0e7593e599ddec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae007a7f3334b813b2d0e7593e599ddec">&#9670;&nbsp;</a></span>GetAnimatable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TScrollBar::GetAnimatable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>滚动时是否启用动画。 </p>

</div>
</div>
<a id="aba2ac8ed45af4af945c1e886fe1b09a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba2ac8ed45af4af945c1e886fe1b09a8">&#9670;&nbsp;</a></span>GetAnimatorTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t TScrollBar::GetAnimatorTime </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>翻页滚动动画时间。 </p>

</div>
</div>
<a id="a7064e59b4bf56c65e4368c95da89543a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7064e59b4bf56c65e4368c95da89543a">&#9670;&nbsp;</a></span>GetAutoHide()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TScrollBar::GetAutoHide </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>是否自动隐藏(仅对mobile风格的滚动条有效)。 </p>

</div>
</div>
<a id="aab8cc5a1421cb1b6dcb80ce89bba2e2f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab8cc5a1421cb1b6dcb80ce89bba2e2f">&#9670;&nbsp;</a></span>GetRow()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TScrollBar::GetRow </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>行的高度。 </p>

</div>
</div>
<a id="a5e42850d84226f4d5d29454d3d73b96c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e42850d84226f4d5d29454d3d73b96c">&#9670;&nbsp;</a></span>GetValue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TScrollBar::GetValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>当前的值。 </p>

</div>
</div>
<a id="ab96947296739d842a372d8541c406132"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab96947296739d842a372d8541c406132">&#9670;&nbsp;</a></span>GetVirtualSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TScrollBar::GetVirtualSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>虚拟宽度或高度。 </p>

</div>
</div>
<a id="a9099efab1a042abfc22fa4a3273013ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9099efab1a042abfc22fa4a3273013ee">&#9670;&nbsp;</a></span>HideByOpacityAnimation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TScrollBar::HideByOpacityAnimation </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>duration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>delay</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>通过动画隐藏滚动条。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">duration</td><td>动画持续时间。 </td></tr>
    <tr><td class="paramname">delay</td><td>动画执行时间。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a1a1653f58568b388494412bd11c6cfc3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a1653f58568b388494412bd11c6cfc3">&#9670;&nbsp;</a></span>IsMobile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TScrollBar::IsMobile </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>判断是否是mobile风格的滚动条。</p>
<dl class="section return"><dt>返回</dt><dd>返回TRUE表示是mobile风格的，否则表示不是mobile风格的。 </dd></dl>

</div>
</div>
<a id="a398d425978a1d7f7dc1a3ecda9fdbeda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a398d425978a1d7f7dc1a3ecda9fdbeda">&#9670;&nbsp;</a></span>ScrollDelta()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TScrollBar::ScrollDelta </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>delta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>在当前的值上增加一个值，并滚动到新的值，并触发EVT_VALUE_CHANGED事件。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">delta</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a0ce9ee8f69d3016716d399beba03e7a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ce9ee8f69d3016716d399beba03e7a2">&#9670;&nbsp;</a></span>ScrollTo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TScrollBar::ScrollTo </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>duration</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>滚动到指定的值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。 </td></tr>
    <tr><td class="paramname">duration</td><td>动画持续时间。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a41d82384d1fd184b9e4cf35b901c036b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41d82384d1fd184b9e4cf35b901c036b">&#9670;&nbsp;</a></span>SetAnimatorTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TScrollBar::SetAnimatorTime </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>animator_time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置翻页滚动动画时间。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">animator_time</td><td>时间。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aad5cf13c0c9ed79caf58aa072daeeee2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad5cf13c0c9ed79caf58aa072daeeee2">&#9670;&nbsp;</a></span>SetAutoHide()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TScrollBar::SetAutoHide </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>auto_hide</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置auto_hide属性。</p>
<p>&gt;仅对mobile风格的滚动条有效</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">auto_hide</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a1d540f6bacb6dcbda238c83300a31f7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d540f6bacb6dcbda238c83300a31f7c">&#9670;&nbsp;</a></span>SetParams()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TScrollBar::SetParams </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>virtual_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>row</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置参数。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">virtual_size</td><td>虚拟高度。 </td></tr>
    <tr><td class="paramname">row</td><td>每一行的高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a0484f7222ff96b53a5c7ab6e3ea000f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0484f7222ff96b53a5c7ab6e3ea000f6">&#9670;&nbsp;</a></span>SetValue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TScrollBar::SetValue </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置值，并触发EVT_VALUE_CHANGED事件。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a990dea3974c52a72398ed948b58599ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a990dea3974c52a72398ed948b58599ef">&#9670;&nbsp;</a></span>SetValueOnly()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TScrollBar::SetValueOnly </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置值，但不触发EVT_VALUE_CHANGED事件。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a44b577fb500ad29aee7c0daa3b15984e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44b577fb500ad29aee7c0daa3b15984e">&#9670;&nbsp;</a></span>ShowByOpacityAnimation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TScrollBar::ShowByOpacityAnimation </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>duration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>delay</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>通过动画显示滚动条。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">duration</td><td>动画持续时间。 </td></tr>
    <tr><td class="paramname">delay</td><td>动画执行时间。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
